home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
501-525
/
disk_519
/
avlsort
/
isatty.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
1KB
|
34 lines
/*==========================================================================
* ISATTY.C, by Robert L. Pyron
*
* Naive implementation of isatty() for Amiga using Lattice C 5.05.
* See the following message excerpt (from BIX) about why this
* approach may not be such a good idea...
*
*--------------------------------------------------------------------------
* sas.c/old.amiga.c #4245, from jtoebes, Fri Dec 8 09:42:11 1989
*--------------------------------------------------------------------------
* As for isatty(), IsInteractive may not be the best choice for what you
* want. It returns True for prt:. You may wish to consider sending a
* ACTION_INFO packet or an ACTION_RAWMODE packet to the handler and see
* if it returns ACTION_NOT_KNOWN or not. Whawes can verify the best choice
* of packets to use for the test.
*
*==========================================================================
*/
#include <stdio.h>
#include <ios1.h>
#include <proto/dos.h>
int __regargs isatty( int fd )
{
struct UFB *ufb;
if ( (ufb = chkufb(fd)) == NULL )
return( 0 );
else
return (int) IsInteractive( ufb->ufbfh );
}